/*
 * HashTable.h
 *
 */

#ifndef HASHTABLE_H_
#define HASHTABLE_H_

#include "../Types.h"
#include "../BinaryFile.h"

class HashTable : public BinaryFile {
private:
	typedef /*typename*/ std::vector<BigInt>::const_iterator ConstIterator;
	typedef /*typename*/ std::vector<BigInt>::iterator Iterator;
	std::vector<BigInt> table;

public:
	HashTable();
	virtual ~HashTable();

	void set(BigInt beg, BigInt end, BigInt value);
	void setCircular(BigInt beg, BigInt jump, BigInt value);
	void replace(BigInt previous, BigInt value);
	BigInt get(BigInt index) const;
	void duplicate();
	bool reduce();
	BigInt size() const;

	String toString() const;

	void save();
	void load();
};

#endif /* HASHTABLE_H_ */
